<?php

session_start();

// this sets variables in the session 

include_once('config.php');

$productID = $_POST['id'];

//                echo $userID;
//                    $count = 0;
$sql = "SELECT * FROM `cart` WHERE active = 1 AND userId = " . $_SESSION['id'] . "";
$result = mysql_query($sql);
//                    while($row=  mysql_fetch_array($result)){
//                        $count++;
//                    }
$count = mysql_num_rows($result);
//                echo $count;
echo '<img src="images/cart.png" width="25px"/>
    <p id="cartParagraph" content="' . $count . '">[' . $count . ']</p>';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
